package com.b2c.open.gateway.filter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * 自定义熔断
 * liuyu07
 */
@RestController
public class FallbackController {

    private static final Logger logger = LoggerFactory.getLogger(FallbackController.class);

    /**
     * 熔断回调
     * @return Mono
     */
    @RequestMapping("/fallback")
    public HashMap fallback() {
        logger.error("系统熔断");
        HashMap map = new HashMap();
        map.put("error","系统熔断");
        return map;
    }

}
